<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">
    <input id="c-id" disabled class="form-control" name="row[id]" type="hidden" value="{$ids}">
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('产品名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_name" disabled class="form-control" name="row[product_name]" type="text" value="{$row.product_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('产品序列号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-product_code" disabled class="form-control" name="row[product_code]" type="text" value="{$row.product_code|htmlentities}-{$row.producetime|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('所属工厂')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-factory_tile" disabled class="form-control" name="row[factory_tile]" type="text" value="{$row.factory_tile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户收件信息')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-res_address" disabled class="form-control"  name="row[res_address]" type="text" value="{$row.res_address|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户物流单号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_shipper_code" disabled class="form-control"  name="row[user_shipper_code]" type="text" value="{$row.user_shipper_code|htmlentities}-{$row.usersend_time|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户说明')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-user_content" disabled class="form-control editor" rows="3" name="row[user_content]" cols="30">{$row.user_content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('购买渠道')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-channel_name" disabled class="form-control" name="row[channel_name]" type="text" value="{$row.channel_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('店铺名称')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-shop_name" disabled class="form-control" name="row[shop_name]" type="text" value="{$row.shop_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('订单编号')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-order_code" disabled class="form-control" name="row[order_code]" type="text" value="{$row.order_code|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('实际购买时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-real_pay_time" disabled class="form-control" name="row[real_pay_time]" type="text" value="{$row.real_pay_time|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('用户是否在保')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-work_bao" disabled class="form-control" name="row[work_bao]" type="text" value="{$row.work_bao|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Order_image')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <input id="c-order_image" class="form-control" size="50" name="row[order_image]" type="text" value="{$row.order_image|htmlentities}">
                <div class="input-group-addon no-border no-padding">
                    <span><button type="button" id="faupload-order_image" class="btn btn-danger faupload" data-input-id="c-order_image" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp,image/webp" data-multiple="false" data-preview-id="p-order_image"><i class="fa fa-upload"></i> {:__('Upload')}</button></span>
                    <span><button type="button" id="fachoose-order_image" class="btn btn-primary fachoose" data-input-id="c-order_image" data-mimetype="image/*" data-multiple="false"><i class="fa fa-list"></i> {:__('Choose')}</button></span>
                </div>
                <span class="msg-box n-right" for="c-order_image"></span>
            </div>
            <ul class="row list-inline faupload-preview" id="p-order_image"></ul>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remarks" disabled class="form-control" name="row[remarks]" type="text"  value="{$row.remarks|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工厂确认收货时间')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-confirm_time" disabled class="form-control" name="row[confirm_time]" type="text" value="{$row.confirm_time|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Detection_content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-detection_content" class="form-control editor" rows="5" name="row[detection_content]" cols="50">{$row.detection_content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Damage_reason')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!--<input id="c-damage_reason" class="form-control" name="row[damage_reason]" type="number" value="">
           -->
            <div class="radio">
                {foreach name="reasonList" item="vo"}
                <label for="row[damage_reason]-{$key}"><input disabled id="row[damage_reason]-{$key}" name="row[damage_reason]" type="radio" value="{$key}" {in name="key" value="$row.damage_reason"}checked{/in} /> {$vo}</label>
                {/foreach}
            </div>


        </div>
    </div>
    {if $damage_reason == 1}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工厂检查维修状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-factory_status" disabled class="form-control selectpicker" multiple="" name="row[factory_status][]">
                <!--{foreach name="problemList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.problem"}selected{/in}>{$vo}</option>
                {/foreach}-->
                {foreach name="repair_fzl" item="vo"}
                <option   value="{$key}" {in name="key" value="$row.factory_status"}selected{/in}>{$vo.name}</option>
                {/foreach}

            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('问题')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-problem" disabled class="form-control selectpicker" multiple="" name="row[problem][]">
                <!--{foreach name="problemList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.problem"}selected{/in}>{$vo}</option>
                {/foreach}-->
                {foreach name="parentList_fzl" item="vo"}
                <option   value="{$key}" {in name="key" value="$row.problem"}selected{/in}>{$vo.name}</option>
                {/foreach}

            </select>
        </div>
    </div>
    {/if}
    {if $damage_reason != 1}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工厂检查维修状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-factory_status" disabled class="form-control selectpicker" multiple="" name="row[factory_status][]">
                <!--{foreach name="problemList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.problem"}selected{/in}>{$vo}</option>
                {/foreach}-->
                {foreach name="repair_zl" item="vo"}
                <option   value="{$key}" {in name="key" value="$row.factory_status"}selected{/in}>{$vo.name}</option>
                {/foreach}

            </select>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('问题')}:</label>
        <div class="col-xs-12 col-sm-8">
            <select  id="c-problem" disabled class="form-control selectpicker" multiple="" name="row[problem][]">
                <!--{foreach name="problemList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.problem"}selected{/in}>{$vo}</option>
                {/foreach}-->
                {foreach name="parentList_zl" item="vo"}
                <option   value="{$key}" {in name="key" value="$row.problem"}selected{/in}>{$vo.name}</option>
                {/foreach}

            </select>
        </div>
    </div>
    {/if}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工厂备注')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-gcremarks" class="form-control editor" rows="5" name="row[gcremarks]" cols="50">{$row.gcremarks|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cost_content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="c-cost_content" class="form-control editor" rows="3" name="row[cost_content]" cols="30">{$row.cost_content|htmlentities}</textarea>
        </div>
    </div>
    <div class="form-group row">
        <table   class="table table-striped table-bordered table-hover table-nowrap" id="table_from"  style="width: 80%;margin-left: 50px">
            <thead>
            <tr>
                <th>工厂<span style="color:red;">*</span></th>
                <th>渠道</th>
                <th>费用项</th>
                <th>工厂收取费用</th>
                <th>心喜阅费用</th>
            </tr>
            </thead>

            <tbody class="lyj_tbody">
            </tbody>
        </table>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('是否换购')}:</label>
        <div class="col-xs-12 col-sm-8">

            <select  id="c-is_huangou" class="form-control selectpicker" name="row[is_huangou]">
                {foreach name="ishuangouList" item="vo"}
                <option value="{$key}" {in name="key" value="$row.is_huangou"}selected{/in}>{$vo}</option>
                {/foreach}
            </select>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('工厂收取费用')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-cost" class="form-control" step="0.01" name="row[cost]" type="number" value="{$row.cost|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('心喜阅费用')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-real_cost" class="form-control" name="row[real_cost]" type="number" value="{$row.real_cost|htmlentities}">
        </div>
    </div>



    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('售后客服确认维修状态')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input  id="c-sales_status" class="form-control"  name="row[sales_status]" type="text" value="{$row.sales_status|htmlentities}">
        </div>
    </div>
   {if $confirmdetection_bao_time}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('确认检测结果时间')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input class="form-control datetimepicker"
                   data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true"
                   id="c-confirmdetection_time"
                   type="text"
                   name="row[confirmdetection_time]"
                   value="{$confirmdetection_bao_time|htmlentities}"
                   placeholder="请选择时间">
        </div>
    </div>
    {else}
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('确认检测结果时间')}:</label>
        <div class="col-xs-12 col-sm-8">

            <input class="form-control datetimepicker"
                   data-date-format="YYYY-MM-DD HH:mm:ss"
                   data-use-current="true"
                   data-date-use-current="false"
                   id="c-confirmdetection_time"
                   type="text"
                   name="row[confirmdetection_time]"
                   value=""
                   placeholder="请选择时间">
        </div>
    </div>
    {/if}
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="button" class="btn btn-success btn-confirmdetectionre-click" >取消</button>
            <button type="button" class="btn btn-success btn-confirmdetectionbao-click" data-order='{"status":7,"id":{$ids}}'>保存</button>
            <button type="button" class="btn btn-success btn-confirmdetection-click" data-order='{"status":7,"id":{$ids}}'>确认</button>
        </div>
    </div>
</form>
<script type="text/javascript">
    // === 设置分数上限
    function cs (price) {

        console.log("进入方法","number =",price.value);
        const moment = require('moment');
        var max_integral= moment().format('YYYY-MM-DD HH:mm:ss');
       // $("#c-confirmdetection_time").val(max_integral)
    }
</script>
